<template>
	<el-select v-model="model" :disabled="!props.isEdit">
		<template #prefix>
			<el-icon>
				<ele-Postcard />
			</el-icon>
		</template>
		<el-option v-for="item in options" :key="item.code" :value="item.code" :label="item.code" />
	</el-select>
</template>

<script lang="ts" setup>
//站点下拉选择框
import { ref, watch } from 'vue';
import { BasEnumApi } from '/@/api/bas/basEnum';

defineOptions({ name: 'zhanDianSelect' });
const model = defineModel()

const props = defineProps({
	isEdit: {
		type: Boolean,
		default: true,
	},
})

const options = ref<any[]>([]);

onMounted(async () => {
	let res = await BasEnumApi.getZhanDian();
	options.value = res.filter(item => item.isEnabled == true);
})

</script>

<style lang="scss" scoped></style>
